<?php

class GoodsShelfModel extends Model {
	/* 对应的数据表（不包含表明前缀） */
		protected	$tableName	=	'goods_shelf';
	/*
	 *	查询所有商品信息
	 *	`is_delete`    enum('Y','N')
   	 *  `enable`       enum('Y','N') not null default 'Y' comment '是否可用',
	 */
	public function selectAllByPage($ary, $limited = 20) {
		/**
		if (is_string ( $ary )) {
			if ($ary)
				$ary = $ary . "  and is_delete='N' ";
		} else {
			$ary ['is_delete'] = 'N';
		}
		**/
		$pageShelf = $this -> where ( $ary )->order ( ' on_time desc ' )->findPage ( $limited );
		
		return $pageShelf;
	}
}

?>